<?php

Yii::import('common.models._base.BaseProfiles');

class Profiles extends BaseProfiles {

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

       public function rules() {
        return array(
            //array('last_name, first_name,about', 'required'),
            array('user_id, timestamp, phone, age, skill_country_id, skill_state_id', 'numerical', 'integerOnly'=>true),
            array('privacy', 'length', 'max'=>9),
            array('last_name, first_name', 'length', 'max'=>50),
            array('date_of_birth', 'length', 'max'=>10),
            array('photo, facebook, twitter, linkedin, website_title, website_link, blog_title, blog_link, others, others_link', 'length', 'max'=>45),
            array('about, experience, other_info', 'safe'),
            array('last_name, first_name, phone, age, date_of_birth, photo, about, experience, other_info, skill_country_id, skill_state_id, facebook, twitter, linkedin, website_title, website_link, blog_title, blog_link, others, others_link', 'default', 'setOnEmpty' => true, 'value' => null),
            
            array('profile_id, user_id, timestamp, privacy, last_name, first_name, phone, age, date_of_birth, photo, about, experience, other_info, skill_country_id, skill_state_id, facebook, twitter, linkedin, website_title, website_link, blog_title, blog_link, others, others_link, cache_last_updated', 'safe', 'on'=>'search'),
           array('photo,', 'file', 'allowEmpty' => true,
                'types' => 'jpg, jpeg,gif',
                'maxSize' => 1024 * 1024 * 1, // 1MB
                'tooLarge' => 'The file was larger than 1MB. Please upload a smaller file.'),
        );
    }
  

}